#!/bin/bash
#PBS -N test
#PBS -V
#PBS -l nodes=4:ppn=8,walltime=3:00:00

. /opt/modules/Modules/3.2.6/init/bash
 module load intel openmpi
cd /lustre/home/mpotts/FEM/Regression.d/tempnldynamics
../create_mfiles.pl
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_sparse_gtempera.inp
mpirun -n 2 --machinefile host.0 ../../bin/aeros  tempnldynamics_sparse_gtempera.inp &
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_skyline_gtempvel.inp
mpirun -n 2 --machinefile host.1 ../../bin/aeros  tempnldynamics_skyline_gtempvel.inp &
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_mumps_gtempera.inp
mpirun -n 2 --machinefile host.2 ../../bin/aeros  tempnldynamics_mumps_gtempera.inp &
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_spooles_gtempvel.inp
mpirun -n 2 --machinefile host.3 ../../bin/aeros  tempnldynamics_spooles_gtempvel.inp &
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_spooles_pivot_gtempera.inp
mpirun -n 2 --machinefile host.4 ../../bin/aeros  tempnldynamics_spooles_pivot_gtempera.inp &
echo mpirun -n 2 ../../bin/aeros  tempnldynamics_mumps_pivot_gtempvel.inp
mpirun -n 2 --machinefile host.5 ../../bin/aeros  tempnldynamics_mumps_pivot_gtempvel.inp &
echo mpirun -n 2 ../../bin/aeros -n 2 --dec --nsub 4 tempnldynamics_FETI_DP_gtempera.inp
mpirun -n 2 --machinefile host.6 ../../bin/aeros -n 2 --dec --nsub 4 tempnldynamics_FETI_DP_gtempera.inp &
wait %1 %2 %3 %4 %5 %6 %7 
